package com.hjd.shop.serviceimpl;

import com.alibaba.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.hjd.shop.entity.SGoods;
import com.hjd.shop.mapper.SGoodsMapper;
import com.hjd.shop.api.service.SGoodsService;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 商品表 服务实现类
 * </p>
 *
 * @author 胡江迪
 * @since 2020-10-13
 */
@Component
@Service(interfaceClass = SGoodsService.class)
public class SGoodsServiceImpl extends ServiceImpl<SGoodsMapper, SGoods> implements SGoodsService {
    @Override
    public SGoods getOneById(String id) {
        SGoods goods = this.selectById(id);
        return goods;
    }

    @Override
    public void addGoods(SGoods goods) {
        if (null!=goods) {
            this.insert(goods);
        }
    }

    @Override
    public String test(String msg) {
        System.out.println(msg);
        return msg;
    }
}
